﻿//-----------------------------------------------------------------------
// <copyright file="IriConstType.cs" company="tuliprules.org">
//     Copyright (c) 2011 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the IriConstType class.</summary>
//-----------------------------------------------------------------------
namespace Tulip.Rules.Models.Rif.Prd
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents the IRICONST type.
    /// </summary>
    [Serializable]
    [DesignerCategory(@"code")]
    [XmlType(TypeName = "IRICONST.type", Namespace = "http://www.w3.org/2007/rif#")]
    public class IriConstType : IRifPrdElement
    {
        /// <summary>
        /// The text field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private List<string> textField;

        /// <summary>
        /// The type field.
        /// </summary>
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string typeField;

        /// <summary>
        /// Initializes a new instance of the <see cref="IriConstType"/> class. 
        /// </summary>
        public IriConstType()
        {
            this.textField = new List<string>();
            this.typeField = "http://www.w3.org/2007/rif#iri";
        }

        /// <summary>
        /// Gets or sets text for mixed type.
        /// </summary>
        [XmlTextAttribute]
        public List<string> Text
        {
            get
            {
                return this.textField;
            }

            set
            {
                this.textField = value;
            }
        }

        /// <summary>
        /// Gets or sets the IRI constant type.
        /// </summary>
        [XmlAttribute("type", DataType = "anyURI")]
        public string Type
        {
            get
            {
                return this.typeField;
            }

            set
            {
                this.typeField = value;
            }
        }
    }
}